import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    // 重定向
    redirect: '/login'
  },
  //首页
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  //消息中心
  {
    path: '/message',
    name: 'message',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Message.vue')
  },
  //消息中心详情页
  {
    path: '/messageXQ',
    name: 'messageXQ',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/MessageXQ.vue')
  },
  //个人中心
  {
    path: '/userlest',
    name: 'userlest',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/Userlest.vue')
  },
  //个人详情
  {
    path: '/userXQ',
    name: 'userXQ',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/UserXQ.vue')
  },
  //物流单列表
  {
    path: '/star',
    name: 'star',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/Star.vue')
  },
  //物流单评价
  {
    path: '/starXQ',
    name: 'starXQ',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/StarXQ.vue')
  },
  //登录页
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/Login.vue')
  },
  //商品订单
  {
    path: '/shipment',
    name: 'shipment',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Shipment.vue')
  },
  //发货
  {
    path: '/deliverGoods',
    name: 'deliverGoods',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/DeliverGoods.vue')
  },
  //评价
  {
    path: '/evaluateInfo',
    name: 'evaluateInfo',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../components/EvaluateInfo.vue')
  },
   //客户管理
   {
    path: '/customer',
    name: 'customer',
    component: () => import(/* webpackChunkName: "about" */ '../views/Customer.vue')
  },
   //客户详情
   {
    path: '/customerXQ',
    name: 'customer',
    component: () => import(/* webpackChunkName: "about" */ '../components/customerXQ.vue')
  },
   //客户编辑
   {
    path: '/customerBJ',
    name: 'customerBJ',
    component: () => import(/* webpackChunkName: "about" */ '../components/CustomerBJ.vue')
  },
   //新增客户
   {
    path: '/customerXZ',
    name: 'customerXZ',
    component: () => import(/* webpackChunkName: "about" */ '../components/CustomerXZ.vue')
  },
   //走访列表
   {
    path: '/vsitlist',
    name: 'vsitlist',
    component: () => import(/* webpackChunkName: "about" */ '../components/Vsitlist.vue')
  },
   //新增走访记录
   {
    path: '/vsitXZ',
    name: 'vsitXZ',
    component: () => import(/* webpackChunkName: "about" */ '../components/VsitXZ.vue')
  },
   //客户名称
   {
    path: '/selectCustomer',
    name: 'selectCustomer',
    component: () => import(/* webpackChunkName: "about" */ '../components/SelectCustomer.vue')
  },
   //客户列表
   {
    path: '/custlist',
    name: 'custlist',
    component: () => import(/* webpackChunkName: "about" */ '../views/Custlist.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
